﻿using System.Collections.Generic;
using System.IO;
using Abp.Dependency;
using Magicodes.ExcelImporter.Models;
using Magicodes.Plus.Application.Dto;

namespace Magicodes.ExcelImporter
{
    /// <summary>
    ///     导出
    /// </summary>
    public interface IExcelImporter : ISingletonDependency
    {
        /// <summary>
        ///     导出Excel模板
        /// </summary>
        /// <param name="fileName">文件名称</param>
        /// <returns>文件</returns>
        FileDto GetGenerateTemplate<T>(string fileName);

        /// <summary>
        ///  导入Excel
        /// </summary>
        /// <typeparam name="T">导入Dto</typeparam>
        /// <param name="stream">文件流</param>
        /// <returns></returns>
        ImportResultDto<T> LoadFromExcel<T>(Stream stream) where T : new();
    }
}